﻿@model SMECustomerWebsite.Models.ViewModels.DaoManager.ChangeDaoViewModel
@using Common.Data.Repository.Enum;
@using Common.Data;
<div class="modal fade cm-cp-customer-info" tabindex="-1" role="dialog" aria-hidden="true" id="choose_condition_modal">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
                @using (Html.BeginForm("ExportDataChangeDaoRequestDeviation", "DaoManager", FormMethod.Post, new { @class = "sme-form-export" }))
                {
                    Html.AntiForgeryToken();
                    Html.ValidationSummary(true);
                    List<SelectListItem> listReason = new List<SelectListItem>();
                    listReason.Add(new SelectListItem
                    {
                        Text = "--- All ---",
                        Value = "-1",
                        Selected = true
                    });
                    var listEnum = Enum.GetValues(typeof(ReasonChangeDaoEnum)).Cast<ReasonChangeDaoEnum>().ToList();
                    listEnum.ForEach(x =>
                    {
                        listReason.Add(new SelectListItem
                        {
                            Text = EnumHelper<ReasonChangeDaoEnum>.GetDisplayValue(x),
                            Value = ((int)x).ToString(),
                            Selected = false
                        });
                    });
                    <div class="item form-group">
                        <label class="col-md-12">Thời gian tạo:</label>
                        @Html.TextBoxFor(m => m.CreateDateRange, new { @class = "form-control branch_register", placeholder = "Chọn thời gian", @id = "create_date_range" })
                    </div>
                    <div class="item form-group">
                        <label class="col-md-12">Trạng thái yêu cầu:</label>
                        @Html.DropDownListFor(m => m.Status, new List<SelectListItem>(), new { @class = "form-control branch_register", placeholder = "Trạng thái yêu cầu", required = "required", id = "choose_Status" })
                    </div>
                    <div class="item form-group">
                        <label class="col-md-12">Lý do chuyển:</label>
                        @Html.DropDownListFor(m => m.Reason, listReason, new { @class = "form-control branch_register", placeholder = "Lý do", required = "required" })
                    </div>
                    <div class="item form-group">
                        <div class=" checkbox">
                            <label>
                                @Html.CheckBoxFor(m => m.IsDeviation, new { }) Yêu cầu tính kết quả cho tháng trước
                            </label>
                        </div>
                    </div>
                    <div class="item form-group">
                        <button type="submit" class="btn btn-success right" value="Upload">Submit</button>
                        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                    </div>
                }
            </div>
        </div>
    </div>
</div>